package com.dmn.gcode.springchains.baseoperators;

import com.dmn.gcode.springchains.core.AbstractOperator;
import com.dmn.gcode.springchains.core.IChainMaster;
import com.dmn.gcode.springchains.core.IOperator;

import java.util.List;

/**
 * date 17.01.11
 *
 * @author dvponomarev
 * @version 1.0
 */
public class SequenceOperator extends AbstractOperator {
    private List<IOperator> sequence;

    public void execute(IChainMaster chainMaster) throws Throwable {
        for (IOperator operator : sequence) {
            chainMaster.execute(operator);
        }
    }

    public void setSequence(List<IOperator> sequence) {
        this.sequence = sequence;
    }
}
